/**
 * @file
 * @author dousha 
 * @date 2020/11/28.
 */

#ifndef CRYPTSTICK_SERIAL_H
#define CRYPTSTICK_SERIAL_H

#include <stm32f1xx_hal.h>
#include <stdint.h>

#define SERIAL_RX_SIZE 64
#define SERIAL_TX_SIZE 64

extern void serial_init(UART_HandleTypeDef *);

extern void serial_write_string(const char *);

extern void serial_write_byte(uint8_t);

extern void serial_write_bytes(const uint8_t *, uint8_t);

extern void serial_write_u8(uint8_t);

extern void serial_write_hex(const uint8_t *, size_t);

#endif //CRYPTSTICK_SERIAL_H
